/*	变量生命周期和作用域
 *
 */

#include<stdio.h>
int num;			//全局变量即使没有初始化也会自动初始化成0.

void func() {
	int num1 = 0;
	printf("num1=%d\n", num1);
}

int main () {
	printf("num=%d\n", num);
	func();
	{
		int num2 = 0;
		printf("num2=%d\n", num2);
	}
	return 0;
}
